import cv2
import numpy as np


pie = cv2.imread('bilibili.png')
kernel = np.ones((7,7),np.uint8)
dilate = cv2.dilate(pie,kernel,iterations = 5)
erosion = cv2.erode(pie,kernel,iterations = 5)
gradient = cv2.morphologyEx(pie, cv2.MORPH_GRADIENT, kernel)
res = np.hstack((dilate,erosion,gradient))
cv2.imshow('res', res)
cv2.waitKey(0)
cv2.destroyAllWindows()

